﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using DTO;
using DAO;

namespace BUS
{
    public class DoanhThuNam_BUS
    {
        public static List<DoanhThuNam_DTO> GetDoanhThuNamList()
        {
            List<DoanhThuNam_DTO> list = new List<DoanhThuNam_DTO>();
            try
            {
                DoanhThuNam_DAO DAO = new DoanhThuNam_DAO();
                list = DAO.GetDoanhThuNamList();
            }
            catch (System.Exception)
            { }
            return list;
        }

        public static DoanhThuNam_DTO GetDoanhThuNamDetails(int Nam)
        {
            DoanhThuNam_DTO DTO = new DoanhThuNam_DTO();
            try
            {
                DoanhThuNam_DAO DAO = new DoanhThuNam_DAO();
                DTO = DAO.GetDoanhThuNamDetails(Nam);
            }
            catch (System.Exception)
            {
            }
            return DTO;
        }

        public static bool KiemTra(int Nam)
        {
            return DoanhThuNam_DAO.KiemTra(Nam);
        }

        public static string MaxMaDoanhThuMan()
        {
            return DoanhThuNam_DAO.MaDoanhThuNamMax();
        }

        public static void InsertDoanhThuNam(DoanhThuNam_DTO DTO)
        {
            try
            {
                DoanhThuNam_DAO DAO = new DoanhThuNam_DAO();
                DAO.InsertDoanhThuNam(DTO);
            }
            catch
            { }
        }

        public static void UpdateDoanhThuNam(DoanhThuNam_DTO DTO)
        {
            try
            {
                DoanhThuNam_DAO DAO = new DoanhThuNam_DAO();
                DAO.UpdateDoanhThuNam(DTO);
            }
            catch
            { }
        }

        public static void DeleteDoanhThuThang(DoanhThuNam_DTO DTO)
        {
            try
            {
                DoanhThuNam_DAO DAO = new DoanhThuNam_DAO();
                DAO.DeleteDoanhThuNam(DTO);
            }
            catch
            { }
        }
    }
}
